Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development
Organizing logic at the level of procedures or functions
As a general rule when writing your client-side logic, whether it is invoked from the
rowDisplayprocedure or from a UI event action procedure or both, it is advisable to keep it as modular as possible, so that a single logical action is coded as a single internal procedure or function. This makes it simpler to invoke the same logic from both theDisplayevent and a particular UI event. In addition, it makes it more straightforward to convert logic as needed to another form, such as JavaScript for a Web interface, and also facilitates the conversion of client code to rules data at a later time. For example, if the code must invoke a specialized block of code on some event, for example to check a credit card number, then if you write just the credit card checking code as a distinct function or procedure, it will be simpler to separate that code, which you must either write by hand for the Web or replace with a standard Web routine to do the same thing, while preserving the standard client API code for the rest of the logic. At a later date, then, it will be more realistic for a migration tool to convert the standard API logic to data, while leaving in calls to specific additional functions you have written.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |